package com.wcl.nullmusic.utils;

/**
 * Created by dllo on 16/1/7.
 */
public class BaseUtils {
    private static BaseUtils baseUtils;

    private BaseUtils() {
    }

    public static BaseUtils getInstance() {
        if (baseUtils == null) {
            baseUtils = new BaseUtils();
        }
        return baseUtils;
    }

    public static String toDurtion(int durtion) {
        String s = new String();
        int minute = (durtion / 1000) / 60;
        int seconds = (durtion / 1000) % 60;
        if (seconds < 10)
            s = minute + ":0" + seconds;
        else
            s = minute + ":" + seconds;
        return s;
    }

    public static String toDurtion2(int durtion) {
        String s = new String();
        int minute = (durtion) / 60;
        int seconds = (durtion) % 60;
        if (seconds < 10)
            s = minute + ":0" + seconds;
        else
            s = minute + ":" + seconds;
        return s;
    }

    public static boolean splitStr(String str) {
        String[] strArr = str.split(":");
        if (strArr[0].equals("http"))
            return true;
        else
            return false;
    }
}
